package main

import (
	"fmt"
)

// 1 .... n
// dp[n] = min{ foreach i in n - 1 : dp[i] + r(i, n) }

func main() {
	var ns = make([][]int, 200)
	var n int
	fmt.Scanln(&n)
	for i := 1; i < n; i++ {
		k := n - i
		ns[i] = make([]int, 200)
		for j := 0; j < k; j++ {
			fmt.Scanf("%d", &ns[i][j])
		}
	}

	var dp = make([]int, 200)
	dp[1] = 0
	var now = 1 << 32
	for i := 2; i <= n; i++ {
		for j := 1; j < i; j++ {
			if dp[j]+ns[j][i-j-1] < now {
				now = dp[j] + ns[j][i-j-1]
			}
		}
		dp[i] = now
		now = 1 << 32
	}
	fmt.Print(dp[n])
}
